﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DictList.aspx.cs" Inherits="Sdepci.InfoCode.Web.CodeIndex.DictList" %>
<%@ Register src="../Includes/VerifyLoginState.ascx" tagname="VerifyLoginState" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>编码字典设置</title>
    <link rel="stylesheet" type="text/css" href="../Css/Style.css" />
    <link rel="stylesheet" type="text/css" href="../Css/Backstage.css" />
    <script type="text/javascript" src="../Javascript/Tree.js"></script>
    <script language="javascript" type="text/javascript">
    function SetHeight()
    {
        document.getElementById("dicttree").style.height = document.documentElement.clientHeight - 65 + "px";
    }

    // 窗口大小变化时重置界面
    window.onresize = SetHeight;

    function OpenAdd(parentDictGuid) {
        var result = window.showModalDialog("DictEdit.aspx?CateGuid=" + document.getElementById("hidCateGuid").value + "&ParentDictGuid=" + parentDictGuid, window, "dialogWidth:650px;dialogHeight:350px");
        if (result != undefined && result == true) {
            document.location = "DictList.aspx?CateGuid=" + document.getElementById("hidCateGuid").value;
        }
    }

    function OpenEdit(dictGuid) {
        var result = window.showModalDialog("DictEdit.aspx?DictGuid=" + dictGuid, window, "dialogWidth:650px;dialogHeight:350px");
        if (result != undefined && result == true) {
            document.location = "DictList.aspx?CateGuid=" + document.getElementById("hidCateGuid").value;
        }
    }

    function OpenDelete(dictGuid) {
        var result = window.showModalDialog("DictDelete.aspx?DictGuid=" + dictGuid, window, "dialogWidth:550px;dialogHeight:240px");
        if (result != undefined && result == true) {
            document.location = "DictList.aspx?CateGuid=" + document.getElementById("hidCateGuid").value;
        }
    }

    function ShowTree()
    {
        imagesDir = "../Images/Tree/";
        affect = "dicttree";
        icon = false;
        InitTreeXml();
        NodeAllExpand(rootNode);
    }
    </script>
</head>
<body onload="javascript:SetHeight();ShowTree();" style="background-color: #cfcfcf;">
    <form id="form1" runat="server">
    <uc1:VerifyLoginState ID="VerifyLoginState1" runat="server" />
    <div id="container">
        <div style="background-color: #92b7e1; border: solid 1px #92b7e1; width: 100%; height: 15px; padding: 5px 0px 5px 0px; margin: 10px auto 0px auto; color: #ffffff; font-weight: bold;">
            <asp:HiddenField ID="hidCateGuid" runat="server" />
            索引“<asp:Label ID="lblCateName" runat="server" Text=""></asp:Label>”的字典列表
            <img style="width: 20px; height: 20px; cursor: pointer; vertical-align: middle;" src="../Images/add.gif" onclick="javascript:OpenAdd('0');" alt="增加" title="增加一级字典" />
        </div>
        <div id="dicttree" style="text-align: left; border: solid 1px #92b7e1; width: 100%; height: 400px; background-color: #ffffff; overflow: auto;">
            <div id="root_child">载入中...</div>
        </div>
    </div>
    </form>
</body>
</html>
